-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement New Weaviate Repository #61
Conversation
@@ -123,17 +129,26 @@ async def get_all_concepts(): | |||
|
|||
|
|||
@app.put("/concepts/{id}", tags=["concepts"]) | |||
async def create_or_update_concept(id: str, terminology_id: str, name: str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless the request param name matches the param name, this should not work afaik
Test for e.g./concepts/some_id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I missed it. Fixed in the next push.
@@ -143,33 +158,58 @@ async def get_all_mappings(): | |||
|
|||
|
|||
@app.put("/concepts/{id}/mappings", tags=["concepts", "mappings"]) | |||
async def create_concept_and_attach_mapping(id: str, terminology_id: str, concept_name: str, text: str): | |||
async def create_concept_and_attach_mapping(concept_id: str, concept_name: str, terminology_name, text: str): | |||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And fixed here too.
api/routes.py
Outdated
raise HTTPException(status_code=404, detail=f"Concept with id {concept_id} not found") | ||
result = repository.client.query.get( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this logic should be part of datastew imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, we can have functions like get_terminology(terminology_name: str)
and get_concept(concept_id: str)
. Should I start implementing it?
Implemented the new weaviate repository functions for the API endpoints.
closes #59